﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="role_user.aspx.cs" Inherits="TCMSystem.admin.role_user" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server" />
    <ext:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
        <Regions>
            <ext:Region ID="Region1" ShowBorder="false" ShowHeader="false" Split="true" EnableSplitTip="true"
                CollapseMode="Mini" Margins="0 0 0 0" Width="200px" Position="Left" Layout="Fit"
                BodyPadding="5px 0 5px 5px" EnableBackgroundColor="true" runat="server">
                <Items>
                    <ext:Grid ID="Grid1" runat="server" ShowBorder="true" ShowHeader="false" EnableCheckBoxSelect="false"
                        EnableRowNumber="true" DataKeyNames="Id" AllowSorting="true" OnSort="Grid1_Sort"
                        SortColumnIndex="0" SortDirection="DESC" AllowPaging="false" EnableMultiSelect="false"
                        EnableRowClick="true" OnRowClick="Grid1_RowClick">
                        <Columns>
                            <ext:BoundField DataField="Name" SortField="Name" ExpandUnusedSpace="true" HeaderText="角色名称" />
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Region>
            <ext:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center"
                Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Left" BodyPadding="5px 5px 5px 0"
                EnableBackgroundColor="true" runat="server">
                <Items>
                    <ext:Form ID="Form3" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
                        ShowBorder="false" LabelAlign="Right" EnableBackgroundColor="true">
                        <Rows>
                            <ext:FormRow ID="FormRow2" runat="server">
                                <Items>
                                    <ext:TwinTriggerBox ID="ttbSearchUser" runat="server" ShowLabel="false" EmptyText="在用户名称中搜索"
                                        Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchUser_Trigger2Click"
                                        OnTrigger1Click="ttbSearchUser_Trigger1Click">
                                    </ext:TwinTriggerBox>
                                    <ext:Label ID="Label1" runat="server">
                                    </ext:Label>
                                </Items>
                            </ext:FormRow>
                        </Rows>
                    </ext:Form>
                    <ext:Grid ID="Grid2" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false"
                        EnableCheckBoxSelect="true" EnableRowNumber="true" DataKeyNames="Id,Name" AllowSorting="true"
                        OnSort="Grid2_Sort" SortColumnIndex="0" SortDirection="DESC" AllowPaging="true"
                        IsDatabasePaging="true" OnPreDataBound="Grid2_PreDataBound" OnRowCommand="Grid2_RowCommand" OnPageIndexChange="Grid2_PageIndexChange">
                        <Toolbars>
                            <ext:Toolbar ID="Toolbar1" runat="server">
                                <Items>
                                    <ext:Button ID="btnDeleteSelected" Icon="Delete" runat="server" Text="从当前角色中移除选中的用户"
                                        OnClick="btnDeleteSelected_Click">
                                    </ext:Button>
                                    <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                                    </ext:ToolbarFill>
                                    <ext:Button ID="btnNew" runat="server" Icon="Add" EnablePostBack="true" OnClick="btnNew_Click"
                                        Text="添加用户到当前角色">
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </Toolbars>
                        <Columns>
                            <ext:BoundField DataField="Name" SortField="Name" Width="100px" HeaderText="用户名" />
                            <ext:BoundField DataField="RealName" SortField="RealName" Width="100px" HeaderText="真实姓名" />
                            <ext:CheckBoxField DataField="Enabled" SortField="Enabled" HeaderText="启用" RenderAsStaticField="true"
                                Width="50px" />
                            <ext:BoundField DataField="Gender" SortField="Gender" Width="50px" HeaderText="性别" />
                            <ext:BoundField DataField="Email" SortField="Email" Width="150px" HeaderText="电子邮箱" />
                            <ext:BoundField DataField="Remark" ExpandUnusedSpace="true" HeaderText="备注" />
                            <ext:WindowField TextAlign="Center" Icon="Information" ToolTip="查看详细信息" Title="查看详细信息"
                                WindowID="Window1" DataIFrameUrlFields="Id" DataIFrameUrlFormatString="~/admin/user_view.aspx?id={0}"
                                Width="50px" />
                            <ext:LinkButtonField ColumnID="deleteField" TextAlign="Center" Icon="Delete" ToolTip="从当前角色中移除此用户" ConfirmText="确定从当前角色中移除此用户？"
                                ConfirmTarget="Top" CommandName="Delete" Width="50px" />
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Region>
        </Regions>
    </ext:RegionPanel>
    <ext:Window ID="Window1" runat="server" IsModal="true" Hidden="true" Target="Top"
        EnableIFrame="true" EnableMaximize="false" EnableMinimize="false" EnableClose="false"
        EnableResize="false" IFrameUrl="about:blank" Width="650px" Height="450px" OnClose="Window1_Close">
    </ext:Window>
    </form>
</body>
</html>
